package com.uto;

import java.util.ArrayList;

import android.os.Parcel;
import android.os.Parcelable;

public class User implements Parcelable {
	
	
	
	
	public static final Parcelable.Creator<User> CREATOR = new Parcelable.Creator<User>() {
        public User createFromParcel(Parcel in) {
            return new User(in);
        }

        public User[] newArray(int size) {
            return new User[size];
        }
    };
    
    public User(Parcel in){
    	this.username = in.readString();
    	this.password = in.readString();
    	this.firstName = in.readString();
    	this.lastName = in.readString();
    	this.money = in.readInt();
    	this.streets = in.readString();
    }
    
    public User(String username , String password , String firstName , String lastName , int money, String streets){
    	this.username = username;
    	this.password = password;
    	this.firstName = firstName;
    	this.lastName = lastName;
    	this.money= money;
    	this.streets=streets;
    }
    
    public User(String username , String password , String firstName , String lastName){
    	this (username , password , firstName , lastName , -1 , "");
    }

	
	public int getMoney() {
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}

	public String getStreets() {
		return streets;
	}

	public void setStreets(String streets) {
		this.streets = streets;
	}


	private String username;
	private String password;
	private String firstName;
	private String lastName;
	private int money;
	private String streets;
	
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

		
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(username);
		dest.writeString(password);
		dest.writeString(firstName);
		dest.writeString(lastName);
		dest.writeInt(money);
		dest.writeString(streets);

	}

}
